<template>
  <div>
    <router-link to="/logtwo/orderone">All contacts</router-link><br>
    <router-link to="/logtwo/ordertwo">Alice</router-link><br>
    <router-link to="/logtwo/orderthree">Bob</router-link><br><br>
    <button @click="Random">随机显示</button>
    <div><router-view></router-view></div>
  </div>
</template>

<script>
export default {

  data(){
    return{
      arr:['orderone','ordertwo','orderthree']
    } 
  },
  methods:{
   Random() {
      const i = Math.floor(Math.random() * 3)
      this.$router.push({
        path: '/logtwo/' + this.arr[i],
      })
    },
  }
}
</script>

<style></style>
